﻿using System;
class PrintingNumbers
{
    static void Main()
    {
        int number;
        Console.Write("Please input number: ");
        while (true)
        {
            try
            {
                number = int.Parse(Console.ReadLine());
                break;
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message + "\nPlease re-enter number:");
            }
        }
        for (int counter = 1; counter <= number; counter++)
        {
            Console.WriteLine(counter);
        }
        Console.ReadLine();
    }
}

